<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="cn.tedu.pojo.User,java.util.*" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <%
        List<User> userList = (List<User>)request.getAttribute("userList");

    %>
    <table>
        <th>
            <td>id</td>
            <td>name</td>
            <td>username</td>
            <td>option</td>
        </th>
        <%
            for(int i=0;i<userList.size();i++){
                User user = userList.get(i);
        %>
        <tr>
            <td><%=user.getId()%></td>
            <td><%=user.getName()%></td>
            <td><%=user.getUsername()%></td>
            <td><a href="delete.do?id=<%=user.getId()%>">删除</a>&nbsp;&nbsp;
                <a href="findById.do?id=<%=user.getId()%>">修改</a></td>
        </tr>
        <%}%>
    </table>
</body>
</html>